package cn.lili.common.exception;

import cn.lili.common.enums.ResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;


/**
 * 全局业务异常类
 *
 * @author Chopper
 */
@Data
@Slf4j
@EqualsAndHashCode(callSuper = true)
public class BaseServiceException extends RuntimeException {

    private static final long serialVersionUID = 3447728300174142127L;

    /**
     * 响应码
     */
    private int code;

    /**
     * 相应描述
     */
    private String msg;

    public BaseServiceException(String msg) {
        this.code = 500;
        this.msg = msg;
    }
}
